package com.herr.configclient;

import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

@SpringBootApplication//(scanBasePackages = "com.herr.controller")
@ImportResource("classpath:applicationContext.xml")
public class ConfigClientApplication {

    public static void main(String[] args) {
//        如果不需要bootstrap.yml，可打开注释通过如下代码设置spring.cloud.config.uri
//        if (StringUtils.isBlank(System.getProperty("spring.cloud.config.uri"))) {
//            System.setProperty("spring.cloud.config.uri", "http://user:1a1a2b2b3c3c4d4d@127.0.0.1:8100");
//        }
//        System.out.println(System.getProperty("spring.cloud.config.uri"));
        SpringApplication.run(ConfigClientApplication.class, args);
    }
}
